import request from '@/utils/request'
// 获取token
export const loginAPI = (data) => request.post('/user-service/user/login', data)
// 获取验证码arraybuffer
// export const getCodeAPI = (random) => request.get(`/user-service/user/imageCode/${random}`, { responseType: 'arraybuffer' })
// 获取验证码blob
export const getCodeAPI = (random) => request.get(`/user-service/user/imageCode/${random}`, { responseType: 'blob' })

// 工单搜索
export const getListApi = (params) => {
  return request({
    url: '/task-service/task/search',
    params
  })
}
// 新建工单
export const workOrdersApi = (data) => {
  return request({
    url: '/task-service/task/create',
    method: 'POST',
    data
  })
}
// 工单状态列表
export const workStatusApi = (statusId, statusName) => {
  return request({
    url: '/task-service/task/allTaskStatus',
    params: {
      statusId,
      statusName
    }

  })
}

